package com.hs.biye.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName regnus
 */
@TableName(value ="regnus")
@Data
public class Regnus implements Serializable {
    /**
     * 主键
     */
    @TableId
    private Integer regNusId;

    /**
     * 员工的id
     */
    private Integer employeeId;


    private Integer departmentId;

    /**
     * 上午票数
     */
    private Integer amNumber;

    /**
     * 下午票数
     */
    private Integer pmNumber;

    /**
     * 使用时间
     */
    private LocalDate useTime;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 逻辑删除
     */
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Regnus other = (Regnus) that;
        return (this.getRegNusId() == null ? other.getRegNusId() == null : this.getRegNusId().equals(other.getRegNusId()))
            && (this.getEmployeeId() == null ? other.getEmployeeId() == null : this.getEmployeeId().equals(other.getEmployeeId()))
            && (this.getAmNumber() == null ? other.getAmNumber() == null : this.getAmNumber().equals(other.getAmNumber()))
            && (this.getPmNumber() == null ? other.getPmNumber() == null : this.getPmNumber().equals(other.getPmNumber()))
            && (this.getUseTime() == null ? other.getUseTime() == null : this.getUseTime().equals(other.getUseTime()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRegNusId() == null) ? 0 : getRegNusId().hashCode());
        result = prime * result + ((getEmployeeId() == null) ? 0 : getEmployeeId().hashCode());
        result = prime * result + ((getAmNumber() == null) ? 0 : getAmNumber().hashCode());
        result = prime * result + ((getPmNumber() == null) ? 0 : getPmNumber().hashCode());
        result = prime * result + ((getUseTime() == null) ? 0 : getUseTime().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", regNusId=").append(regNusId);
        sb.append(", employeeId=").append(employeeId);
        sb.append(", amNumber=").append(amNumber);
        sb.append(", pmNumber=").append(pmNumber);
        sb.append(", useTime=").append(useTime);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}